<style scoped src="./index.scss" lang="scss" rel="stylesheet/scss"></style>
<template src="./index.html"></template>
<script>
export default {
  mixins: [Vue.prototype.$vFN.Mixins.Base, Vue.prototype.$vFN.Mixins.Edit],
  components: {},
  data() {
    return {
      appWindow: window,
      form: {
        real_name: "",
        amount: "",
        callback: "",
      },
    };
  },
  methods: {
    // 初始化
    async init() {
      console.log(this.data);
      this.form.real_name = this.data.real_name;
      this.form.amount = this.data.amount;
      this.form.id = this.data.id
      // 显示窗口
      this.mixinEdit_editVisible = true;
    },
    async determine() {
      console.log(this.form);
      let res = await this.$vFN.Http.post({
        url: "admin/withdraw/reject",
        data: this.form,
      }, window);
      if (res._ok) {
        this.onSuccess();
        this.$vFN.Tools.messageSuccess("操作成功");
        this.mixinEdit_editVisible = false;
      }
    },
    // 成功回调
    onSuccess() {},
    // 取消回调
    onCancel() {},
    // 失败回调
    onError() {},
    // 关闭窗口
    editBoxClose() {
      this.onSuccess();
    },
  },
  mounted() {
    this.init();
  },
  activated() {},
};
</script>